Northwind Test with Yukon

Employee Sales by Country Stored Procedure

Owner

dbo

Creation Date

10-07-2003 10:31:36

Remarks


Parameters

ParameterTypeSize
@Beginning_Datedatetime8
@Ending_Datedatetime8

Source Code

create procedure "Employee Sales by Country" 
@Beginning_Date DateTime, @Ending_Date DateTime AS
SELECT Employees.Country, Employees.LastName, Employees.FirstName, Orders.ShippedDate, Orders.OrderID, "Order Subtotals".Subtotal AS SaleAmount
FROM Employees INNER JOIN 
	(Orders INNER JOIN "Order Subtotals" ON Orders.OrderID = "Order Subtotals".OrderID) 
	ON Employees.EmployeeID = Orders.EmployeeID
WHERE Orders.ShippedDate Between @Beginning_Date And @Ending_Date